{extend name="base"}
{block name="content"}
		<script type="text/javascript">
		$(function(){
			var config='{$list[0]->config}';
			if(config.length>0){
				config=eval("("+config+")");
				for(key in config){
					$("#"+key).val(config[key]);
				}
			}
		});
		</script>
		<div class="wrap">
			<ul class="nav nav-tabs">
				<li><a href="{:url('Push/index')}">平台管理</a></li>
				<li class="active">
					<a href="{:url('Push/config',['id'=>$id,'handle'=>$handle])}">平台配置</a>
				</li>
			</ul>
			<form method="post" class="form-horizontal js-ajax-form" action="">
				<input type="hidden" name="id" value="{$list[0]->id}" />
				<fieldset>
					<div class="control-group">
						<label class="control-label">支付名称</label>
						<div class="controls">
							<input type="text" value="{$list[0]->name}" readonly="readonly">
							<span class="form-required">*</span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">支付说明</label>
						<div class="controls">
							<input type="text" value="{$list[0]->desc}" readonly="readonly">
							<span class="form-required">*</span>
						</div>
					</div>
					{if condition="$handle eq 'Aliyun'"}
					<div class="control-group">
						<label class="control-label">appKey</label>
						<div class="controls">
							<input type="text" name="config[appKey]" id="appKey" value="">
							<span class="form-required">*</span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">accessKeyId</label>
						<div class="controls">
							<input type="text" name="config[accessKeyId]" id="accessKeyId" value="">
							<span class="form-required">*</span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">accessKeySecret</label>
						<div class="controls">
							<input type="text" name="config[accessKeySecret]" id="accessKeySecret" value="">
							<span class="form-required">*</span>
						</div>
					</div>
					{elseif condition="$handle eq 'weixin'" /}
					<div class="control-group">
						<label class="control-label">APPID</label>
						<div class="controls">
							<input type="text" name="pay_config[APPID]" id="APPID" value="">
							<span class="form-required">*</span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">MCHID</label>
						<div class="controls">
							<input type="text" name="pay_config[MCHID]" id="MCHID" value="">
							<span class="form-required">*</span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">KEY</label>
						<div class="controls">
							<input type="text" name="pay_config[KEY]" id="KEY" value="" style="width: 300px;">
							<span class="form-required">*</span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">APPSECRET</label>
						<div class="controls">
							<input type="text" name="pay_config[APPSECRET]" id="APPSECRET" value="" style="width: 300px;">
							<span class="form-required">*</span>
						</div>
					</div>
					{else /}
					{/if}
				</fieldset>
				<div class="form-actions">
					<button type="submit" class="btn btn-primary js-ajax-submit">
						确定操作
					</button>
					<a class="btn" href="{:url('Push/index')}">返回</a>
				</div>
			</form>
		</div>
		<script src="__THEMES__/js/common.js"></script>
{/block}